
package UI;

/*
 * The InputPanel of UI Spring 2010 TCSS 422
 */

import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * To prompt user input of the initial state processes
 * 
 * @author Sydney Lin.
 * @version 1.0
 */
@SuppressWarnings("serial")
public class InputPanel extends JPanel
{
  /**
   * The panel width.
   */
  public static final int WIDTH = 600;
  
  /**
   * The panel height.
   */
  public static final int HEIGHT = 150;

  /**
   * For layout.
   */
  private JPanel my_button_panel;
  
  /**
   * For layout.
   */
  private JPanel my_label_panel;
  
  /**
   * my_goButton starts CPU.
   */
  private JButton my_go_button;
  
  /**
   * The list panel.
   */
  private ListPanel my_list_panel;

  /**
   * Construct an InputPanel.
   */
  public InputPanel()
  {
    super();

    my_button_panel = new JPanel();
    my_label_panel = new JPanel();
    my_list_panel = new ListPanel();
    //final JPanel a_time_panel = new JPanel();
    FlowLayout my_layout = new FlowLayout();
    JButton my_go_button = new JButton("Enter");
    setPreferredSize(new Dimension(WIDTH, HEIGHT));
    // my_processTextFiels = new JTextField(20); // here initiate the panel.

    // the_processString = ""; // reset the process String

    setLayout(my_layout);
    add(my_label_panel);
    my_label_panel.add(new JLabel("Initial Processes"));
    add(my_list_panel);

    /*
    add(a_time_panel);
    a_time_panel.add(new JLabel("Running time"));
    a_time_panel.add(new JTextField(5));
    a_time_panel.add(my_go_button);*/
    setVisible(true);
  }

  /**
   * 
   * @return The list panel of this input panel.
   */
  public ListPanel getListPanel()
  {
    return my_list_panel;
  }
}
